home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************
- File: OpenTptAtm.h
-
- Contains: Public ATM definitions
-
- Written by:
-
- Copyright: © 1994-95 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
-
- To Do:
- ***********************************************************/
-
-
- #ifndef __OPENTPTATM__
- #define __OPENTPTATM__
-
- /***********************************************************
- INCLUDES
- ***********************************************************/
-
- #ifndef __OPENTRANSPORT__
- #include <OpenTransport.h>
- #endif
-
- /***********************************************************
- DEFINES, STRUCTS AND TYPEDEFS
- ***********************************************************/
-
- /*###########################
- ATM Modules Names
- ###########################*/
-
- /* ATM RAW AAL Access Module Name */
- #define kATMRawName "rawatm"
-
- /* ATM Device Module ID */
- #define kATMModuleID 10000
-
- /*###########################
- ATM Addressing
- ###########################*/
-
- /* ATM Address types / masks */
- enum {
- kPVCAddressType = 0x0000000B,
- kSVCAddressType = 0x00010000,
- kUNIAddressType = 0x00010100,
- kUNIPrivateAddressType = 0x00010101,
- kUNIPublicAddressType = 0x00010102,
- kUnknownAddressType = 0x00000000
- };
-
- /* PVC Address structure */
- typedef struct _PVCAddress {
- UInt32 addressType;
- UInt16 vpi;
- UInt16 vci;
- } PVCAddress;
-
- #define kMaxUNIAddressOctets 20
- #define kUNIPrivateAddressOctets 20
- #define kUNIPublicAddressOctets 8
-
- /* ATM Address structure */
- typedef struct _UNIAddress {
- UInt32 addressType;
- UInt8 addr[kMaxUNIAddressOctets];
- } UNIAddress;
-
- #define kATMAddressLength 32
-
- /* ATM Address structure */
- typedef union _ATMAddress {
- UInt32 addressType;
- PVCAddress pvc;
- UNIAddress uni;
- UInt8 max[kATMAddressLength];
- } ATMAddress;
-
- /*###########################
- ATM Traffic Parameters
- ###########################*/
-
- /* ATM AAL types */
-
- typedef UInt32 AALType;
-
- enum {
- kAALTypeNull = 0,
- kAALType1 = 1,
- kAALType2 = 2,
- kAALType34 = 3,
- kAALType5 = 5,
- kAALTypeUser = 16
- };
-
- /* PVC QOS specification structure */
- typedef struct _QOSClass {
- UInt8 fwd;
- UInt8 bwd;
- UInt16 padding;
- } QOSClass;
-
- /* QOS Classes */
- enum {
- kQOSClass0 = 0,
- kQOSClassUnspecified = 0,
- kQOSClass1 = 1,
- kQOSClass2 = 2,
- kQOSClass3 = 3,
- kQOSClass4 = 4
- };
-
- /* PVC Traffic descriptor specification structure */
- typedef struct _TrafficDesc {
- UInt32 fwdPeakCellRate0;
- UInt32 bwdPeakCellRate0;
- UInt32 fwdPeakCellRate01;
- UInt32 bwdPeakCellRate01;
- UInt32 fwdSustCellRate0;
- UInt32 bwdSustCellRate0;
- UInt32 fwdSustCellRate01;
- UInt32 bwdSustCellRate01;
- UInt32 fwdMeanBurstSize0;
- UInt32 bwdMeanBurstSize0;
- UInt32 fwdMeanBurstSize01;
- UInt32 bwdMeanBurstSize01;
- UInt8 bstEffortReq;
- UInt8 fwdTagReq;
- UInt8 bwdTagReq;
- UInt8 padding;
- } TrafficDesc;
-
- /*###########################
- ATM PVC Related
- ###########################*/
-
- /* ATM PVC connect message data structure */
- typedef struct _ATMVCParams {
- AALType aal;
- QOSClass qos;
- TrafficDesc traffic;
- } ATMVCParams;
-
- /*###########################
- ATM DLPI Driver Related
- ###########################*/
-
- typedef struct _ATMSimpleQOS {
- UInt32 dl_qos_type;
- ATMVCParams params;
- } ATMSimpleQOS;
-
- /* QOS structures used by the ATM DLPI Driver */
- #define DL_QOS_SIMPLE_ATM 0x0701
- #define DL_QOS_SIMPLE_ATM_RANGE 0x0702
-
- /* IOCTLs used by the ATM DLPI Driver */
- #define DL_IOC_SUBS_CONNECT 20
- #define DL_IOC_SUBS_DISCONNECT 21
-
- /* ATM Physical Address Length */
- #define kATMPhysicalAddressLength 6
-
- /* A good DL_UNITDATA_IND mblk size */
- #define kGoodUDIndSize 128
-
- #endif /* __OPENTPTATM__ */
-